package com.mmy.service.plane.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.plane.TPlaneOrgRepository;
import com.mmy.domain.plane.TPlaneOrg;
import com.mmy.service.plane.TPlaneOrgService;

@Service
public class TPlaneOrgServiceImpl implements TPlaneOrgService {

	@Autowired
	TPlaneOrgRepository tPlaneOrgRepository;

	/**
	 * 查找全部
	 * 
	 * @param
	 * @return
	 */
	public List<TPlaneOrg> findAll() {
		// TODO Auto-generated method stub
		return tPlaneOrgRepository.findAll();
	}

	/**
	 * 获取最大值
	 * 
	 * @param
	 * @return
	 */
	public Object getMaxOrgID() {
		// TODO Auto-generated method stub
		return tPlaneOrgRepository.getMaxOrgID();
	}

	/**
	 * 根据名称查找
	 * 
	 * @param
	 * @return
	 */
	public List<TPlaneOrg> findByOrgName(String strOrgName) {
		// TODO Auto-generated method stub
		return tPlaneOrgRepository.findByOrgName(strOrgName);
	}

	/**
	 * 新增
	 * 
	 * @param
	 * @return
	 */
	public void save(TPlaneOrg tPlaneOrg) {
		// TODO Auto-generated method stub
		tPlaneOrgRepository.save(tPlaneOrg);
	}

	/**
	 * 新建id
	 * 
	 * @param
	 * @return
	 */
	public void save(int orgID) {
		// TODO Auto-generated method stub
		tPlaneOrgRepository.save(orgID);
	}

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */
	public void delPlaneOrg(List<Integer> lstOrgID) {
		// TODO Auto-generated method stub
		tPlaneOrgRepository.delPlaneOrg(lstOrgID);
	}

	/**
	 * 通过id查找
	 * 
	 * @param
	 * @return
	 */
	public TPlaneOrg findByOrgID(int iOrgID) {
		// TODO Auto-generated method stub
		return tPlaneOrgRepository.findByOrgID(iOrgID);
	}

}
